extends "../rangbaer-3/rangbaer-3.gd"


var baseId = ""
var upText1 = "海盗之魂夺取装备几率翻倍"
var upText2 = "最后的炮火额外发起3次炮击"
func _extInit():
	._extInit()
	lv = 4             #等级的设置
	addSkill("每{cd}秒对当前目标发起5次炮击", "最后的炮火", "lastFire", 12)

func _castCdSkill(id):
	._castCdSkill(id)
	if id=="lastFire":
		lastFire()

func lastFire():
	utils.createSkillTextEff("最后的炮火", position)
	for i in range(p4):
		yield(reTimer(0.15),"timeout")
		if aiCha == null:
			yield(reTimer(0.05),"timeout")
		.normalAtkChara(aiCha)
var p4 = 5
func upgrade():
	.upgrade()
	if upgraded == 1:
		p3 = 8
	if upgraded == 2:
		p4 = 8